package com.haoniu.module.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.haoniu.module.mapper.MerchantPayRecordMapper;
import com.haoniu.module.domain.database.MerchantPayRecord;
import com.haoniu.module.service.MerchantPayRecordService;
import com.haoniu.common.support.Convert;

/**
 * 商户代付金额流水明细 服务层实现
 * 
 * @author houyijun
 * @date 2019-01-28
 */
@Service
public class MerchantPayRecordServiceImpl implements MerchantPayRecordService
{
	@Autowired
	private MerchantPayRecordMapper merchantPayRecordMapper;

	/**
     * 查询商户代付金额流水明细信息
     * 
     * @param id 商户代付金额流水明细ID
     * @return 商户代付金额流水明细信息
     */
    @Override
	public MerchantPayRecord selectMerchantPayRecordById(Integer id) {
	    return merchantPayRecordMapper.selectMerchantPayRecordById(id);
	}
	
	/**
     * 查询商户代付金额流水明细列表
     * 
     * @param merchantPayRecord 商户代付金额流水明细信息
     * @return 商户代付金额流水明细集合
     */
	@Override
	public List<MerchantPayRecord> selectMerchantPayRecordList(MerchantPayRecord merchantPayRecord) {
	    return merchantPayRecordMapper.selectMerchantPayRecordList(merchantPayRecord);
	}
	
    /**
     * 新增商户代付金额流水明细
     * 
     * @param merchantPayRecord 商户代付金额流水明细信息
     * @return 结果
     */
	@Override
	public int insertMerchantPayRecord(MerchantPayRecord merchantPayRecord) {
	    return merchantPayRecordMapper.insertMerchantPayRecord(merchantPayRecord);
	}
	
	/**
     * 修改商户代付金额流水明细
     * 
     * @param merchantPayRecord 商户代付金额流水明细信息
     * @return 结果
     */
	@Override
	public int updateMerchantPayRecord(MerchantPayRecord merchantPayRecord) {
	    return merchantPayRecordMapper.updateMerchantPayRecord(merchantPayRecord);
	}

	/**
     * 删除商户代付金额流水明细对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
	@Override
	public int deleteMerchantPayRecordByIds(String ids) {
		return merchantPayRecordMapper.deleteMerchantPayRecordByIds(Convert.toStrArray(ids));
	}
	
}
